
This is the new and improved mail script.
If you choose to add inputs to the form they will also work without any other changes.
Just add them to mail_form.php but be careful not to change any of the PHP code.

All other inputs added will be sent to you as Form Name : value entered within the mail message.
They will appear after all the other items in the given form.


Just copy the following files to your website to a location you prefer.
If you place them into a directory then re-name contact.php to index.php - you will need to change it in the form also.
If you wish to not use the header and footer files chenge the setting in the config file to false

If you wish to place the form in a page you have then use a Iframe to do this.
Example: <iframe style="width: 722px; height: 352px" src="/includes/contact.php" frameborder="0" align="center"></iframe>

We found that this works best if you choose to just place the form on your page.
If you just place the form on your page without using an iframe the refresh may not work when I person clicks go back.
This will cause problems with the code question as it will not refresh to match the new generated alpha numeric code.


The application can be used as your contact page when using the header / footer files or you can just include a form in your current contact page.
There are four form files and the one used is depending on your settings in the config file.
There are two plain form files, one each for header or non-header and also two file attach forms again with or without headers.
So if you choose to have attach files and no header then the form it will use is mail_form_attach.php.
You can modify it as needed.

contact.conf
contact.php
mail_form_plain.php or mail_form_plain_hdr.php -- depending on if you wish to use just a form or use the app as your page.

return_page.php
auto_res.txt
footer.html --- Not required if you choose to use only the form
header.html --- Not required if you choose to use only the form
mail_form_attach.php or mail_form_attach_hdr.php -- depending on if you wish to use just a form or use the app as your page.
image.php
JAi_____.TTF -- the true type font used for the image generator and mush be copied to the same folder as the other files.

mail_form_attach.php will be used if you activate the attachment ability in the contact.conf

If you placed the files in a sub directory to avoid search engines picking up your config file add a line to your robots.txt file to exclude the indexing of files in this directory.

You can rename contact.php to index.php but it will require to also alter the form line action="contact.php" - be careful not to wreck the php code!
Info for robots.txt should you not know what it is will be also found on NetBizCity. --> http://netbizcity.com/MetaTagTips/tabid/60/Default.aspx

Edit the conf file and change the entries to reflect your website.

Set the domain name without the www as: mydomain.com
Set your email address
Other setting are not required but you can customize the form using them.
Settings such as setting headers on of off or allowing file attachments and the types of files to allow.
Most are explained within the conf file.

To use the Graphic user Verify you must have PHP with GD and FreeType installed.
You must copy the truetype font JAi_____.TTF to your website directory where the script was install.

After this is done test it to be sure it works properly.
Main script is contact.php all other files are called from it.
Just create a link to contact.php and you are done.

If you have problems with the image try loading image.php in your browser to see if there are errors.

To add form inputs use a three column table row where the second column spans two such as:

<tr><td>This is your description</td><td colspan=2>You input goes here</td></tr>

The script will work with as many coluns as you need to add.

If you wish to have an email sent you when an abuse takes place set $notify_abuse=true;

The script is free to use but if you need support then a minimum charge will be required of $10.00.

Since the script has changed dramatically we are not including prior changes from version 1.00

You can rename the files as you wish but the return page is hard coded in the script.
All files can be placed in a sub folder but you may need to edit the mail form to adjust the subfolder name.
The return page may require it be in the same location as your main contact page.

Setting of the form remembering what the user typed is quite easy if you add fields.
Added to the application are functions to reset the values the user typed.
The functions set_orig_value() and set_orig_checkbox() can be used to set the values back when a user hits the back link.
The use is as follows:

If you create a input box named phone_number then use  the function set_original_value as <?php set_orig_value('phone_number') ?> - single quotes!!
The forms are using this function and this is how one looks: 

<input type="text" size="35" name="name" value="<?php set_orig_value('name') ?>">

For check boxes use the set_orig_checkbox() function.

This saves a user time if he or she makes a mistake in filling out your form 
and has to go back to make a change as all imputs will have the info he or she last typed.




CW3 Mail Form Version 3.00
--------------------------
CW3 Mail Form Version 3.30
Added settings to choose file types allowed
Added setting for use of headers

version 3.00
Added ability to set required to any input added to form.
Added functions to re-populate form fields.
Added file upload / file email ability

version 2.01
Removed checking for domain name.
Since we added the new code to generate a key value this was no longer needed.
Made minor adjustments to form to make it more clear as to where added inputs can be placed for custom forms.
Version 2.02
Fixed a problem for windows path error.
Fixed a PHP image problem which caused an error on some servers not using latest version of GD lib. 

Version 2.02
Changes to server calls and POST Vars to support PHP 5


NetBizCity
http://www.netbizcity.com

CW3 Web Hosting
info@cw3host.com

Vincent G.